#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2021/5/12 18:27
# @Author  : LiShan
# @Email   : lishan_1997@126.com
# @File    : plan.py
# @Note    : this is note

timming = [26, 32, 2, 130, 20, 3, [2, 2, 2, 2]]
green_low = timming[0]
green_high = timming[1]
green_interval = timming[2]
cycle_time = timming[3]
loss_time = timming[4]
amber_time = timming[5]
clearing_time = timming[6]
plans = []
for a in range(green_low, green_high + 1, green_interval):
    for b in range(green_low, green_high + 1, green_interval):
        for c in range(green_low, green_high + 1, green_interval):
            for d in range(green_low, green_high + 1, green_interval):
                if (a + b + c + d) == (cycle_time - loss_time):
                    plan = [cycle_time, amber_time, clearing_time, [a, b, c, d]]
                    plans.append(plan)
for plan in plans:
    print(plan)
print("共%d种方案" % len(plans))
